'use strict';

angular.module('app')
  .directive('appHeadBar', [function() {
    return {
      restrict: "A",
      replace: true,
      scope: {
        text: "@"
      },
      templateUrl: "view/template/headBar.html",
      link: function(scope) {
        scope.back = function() {
          window.history.back();
        };
        scope.$on("bcComId", function(event, data) {
          console.log(event, data);
        });


        scope.$emit("bcId", { test: "111" });
      }
    }

  }])
